package org.example.service.impl;

import org.example.dao.TeacherDao;
import org.example.model.Teacher;
import org.example.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherDao teacherDao;
    @Override
    public int addTeacher(Teacher teacher) {
        return teacherDao.addTeacher(teacher);
    }

    @Override
    public int updateTeacher(Teacher teacher) {
        return teacherDao.updateTeacher(teacher);
    }

    @Override
    public int deleteTeacher(int teacherId) {
        return teacherDao.deleteTeacher(teacherId);
    }

    public List<Teacher> queryTeacher() {
        return teacherDao.queryTeacher();
    }

    @Override
    public int deleteTeachers(List<Integer> ids) {
        return teacherDao.deleteTeachers(ids);
    }

    @Override
    public Teacher queryTeacherById(int teacherId) {
        return teacherDao.queryTeacherById(teacherId);
    }

    @Override
    public List<Teacher> queryTeacherByCondition(Map parameters) {
        return teacherDao.queryTeacherByCondition(parameters);
    }

    @Override
    public List<Map<String, Object>> queryTeacherDept() {
        return teacherDao.queryTeacherDept();
    }

}
